home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Frameworks / Sprocket Framework DR2 / Sprocket Starter / SprocketStarter Code / SampleWindow.h < prev    next >
Text File  |  1996-06-03  |  1KB  |  61 lines

  1. // Sprocket Framework header file
  2. // PictureWindow.h
  3.  
  4.  
  5. #ifndef        _PICTUREWINDOW_
  6. #define        _PICTUREWINDOW_
  7.  
  8. #ifndef        _WINDOW_
  9. #include    "Window.h"
  10. #endif
  11.  
  12.  
  13. enum
  14. {
  15.     mPicture            = 1001,
  16.     cCentered            = 1002,
  17.     cUpperLeft            = 1003
  18. };
  19.  
  20.  
  21. class    TSampleWindow : public TWindow
  22. {
  23.   public:
  24.                             TSampleWindow();
  25.     virtual                 ~TSampleWindow();
  26.  
  27.     virtual WindowRef        MakeNewWindow( WindowRef behindWindow );
  28.  
  29.     virtual void            Draw(void);
  30.     
  31.     virtual void            Activate( Boolean activating );
  32.     
  33.     virtual void            ClickAndDrag( EventRecord *eventPtr );
  34.     
  35.     virtual    Boolean            DoCommand(CommandID theCommand);
  36.     virtual void            AdjustMenusBeforeMenuSelection(void);
  37.     
  38.     virtual    OSErr            DragEnterWindow( DragReference dragRef );
  39.     virtual    OSErr            DragInWindow( DragReference dragRef );
  40.     virtual    OSErr            DragLeaveWindow( DragReference dragRef );
  41.     virtual    OSErr            HandleDrop( DragReference dragRef );
  42.     
  43. //    Non-TWindow methods...
  44.     virtual PicHandle        LoadDefaultPicture();
  45.     virtual void            CenterPict( PicHandle picture, Rect *destRectPtr );
  46.     virtual Boolean            IsPictFlavorAvailable( DragReference dragRef );
  47. //    virtual Boolean            IsMouseInContentRgn( DragReference dragRef );
  48.     static void                SetUpStaticMenu( void );
  49.  
  50. protected:
  51.     static    MenuRef            fgMenu;
  52.     static    unsigned long    fgWindowTitleCount;
  53.  
  54.     Boolean                    fCanAcceptDrag;
  55.     PicHandle                fDraggedPicHandle;
  56.     Boolean                    fIsWindowHighlighted;
  57.     Boolean                    fCenter;
  58. };
  59.  
  60. #endif
  61.